package a.e.a;

import a.e.f;
import a.i.ib;
import a.i.n;
import a.j.hg;

import java.awt.*;
import java.io.IOException;

public class cb
  implements hb
{
  public static boolean a;
  
  public void a(Object paramObject, g paramg)
    throws IOException
  {
    boolean bool = r.f;
    hg localhg = (hg)paramObject;
    if (!bool)
    {
      if (localhg.H() == null) {
        return;
      }
      if (bool) {}
    }
    else
    {
      if (localhg.H().equals("")) {
        return;
      }
      paramg.b("text", localhg.H());
    }
    if (!bool) {
      if (localhg.G() != null) {
        paramg.b("outline", f.a(localhg.G()));
      }
    }
    if (!bool)
    {
      if (localhg.F() != null) {
        paramg.b("fill", f.a(localhg.F()));
      }
      if (bool) {}
    }
    else
    {
      if (localhg.A() != null)
      {
        if (bool) {
          break label156;
        }
        if (!localhg.A().equals(Color.black)) {
          paramg.b("color", f.a(localhg.A()));
        }
      }
      paramg.a("fontSize", localhg.W());
    }
    label156:
    if (!bool)
    {
      if (localhg.X() != 0) {
        paramg.b("fontStyle", a(localhg.X()));
      }
      paramg.b("fontName", localhg.V());
    }
    if (!bool)
    {
      if (localhg.M() != 1) {
        paramg.b("alignment", a(localhg.M()));
      }
      if (bool) {}
    }
    else if (localhg.x() != 0.0D)
    {
      double d = localhg.x();
      paramg.a("rotationAngle", d);
    }
    if (!bool) {
      if (localhg.Y() != null)
      {
        if (bool) {
          break label289;
        }
        if (!"default".equals(localhg.Y())) {
          paramg.b("configuration", localhg.Y());
        }
      }
    }
    if ((bool) || (localhg.Y() == null))
    {
      label289:
      if (bool) {
        break label334;
      }
      if (localhg.Z() != 4) {}
    }
    else
    {
      paramg.a("contentWidth", localhg.g());
      paramg.a("contentHeight", localhg.k());
    }
    if (!bool) {
      if (localhg.Z() != 0) {
        label334:
        paramg.b("autoSizePolicy", eb.b(localhg.Z()));
      }
    }
    Object localObject = localhg.f();
    if (localObject != null) {
      try
      {
        String str = ib.c().a(localhg.f(), localhg.f().getClass());
        paramg.b("userdataclass", localhg.f().getClass().getName());
        paramg.b("userdata", str);
      }
      catch (Exception localException)
      {
        n.a("Could not write userdata " + localhg.f() + " " + localException);
      }
    }
    if (!bool) {
      if (localhg.w()) {
        paramg.a("underlineText", true);
      }
    }
    if (!localhg.B()) {
      paramg.a("visible", false);
    }
  }
  
  public static String a(int paramInt)
  {
    if (!r.f) {
      if (paramInt == 3) {
        return "bolditalic";
      }
    }
    switch (paramInt)
    {
    case 0: 
      return "plain";
    case 2: 
      return "italic";
    case 1: 
      return "bold";
    }
    return "plain";
  }
  
  public static String a(byte paramByte)
  {
    switch (paramByte)
    {
    case 0: 
      return "left";
    case 2: 
      return "right";
    }
    return "center";
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.a.cb

 * JD-Core Version:    0.7.0.1

 */